import Vue from "vue";
import VueRouter from "vue-router";

const Home=()=>import("@/pages/home/index")
const About=()=>import("@/pages/about/about")

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect:"/home",
    // component:Home,
    meta: {requiresAuth: true }
  },
  {
    path: "/home",
    name: "home",
    component:Home,
    meta: {requiresAuth: true }
  },
  {
    path: "/about",
    name: "about",
    component:About,
    meta: {requiresAuth: true }
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
